package application

import (
	"ruoyi-go-echo-ddd/internal/domain/model"
	"ruoyi-go-echo-ddd/internal/domain/service"

	"github.com/labstack/echo/v4"
)

type SysRoleDeptApplication struct {
	RoleDeptService *service.SysRoleDeptService
}

func NewSysRoleDeptApplication(u *service.SysRoleDeptService) *SysRoleDeptApplication {
	return &SysRoleDeptApplication{
		RoleDeptService: u,
	}
}

func (s *SysRoleDeptApplication) DeleteByRoleId(e echo.Context, roleId int64) (int64, error) {
	return s.RoleDeptService.DeleteByRoleId(e.Request().Context(), roleId)
}

func (s *SysRoleDeptApplication) BatchInsert(e echo.Context, list []*model.SysRoleDept) (int64, error) {
	return s.RoleDeptService.BatchInsert(e.Request().Context(), list)
}
